package com.wordlearning.app.service;

import org.springframework.core.io.Resource;

import java.io.IOException;
import java.util.Map;

public interface TextToSpeechService {

    byte[] synthesizeText(String text, Long userId) throws IOException;
    byte[] synthesizeTextWithVoice(String text, Long userId, String voice) throws IOException;
    byte[] synthesizeWord(Long wordId, Long userId) throws IOException;
    byte[] synthesizeWordSet(Long wordSetId, Long userId) throws IOException;
    Resource getAudioResource(String audioKey);
    String cacheAudio(String text, byte[] audioData);
    void clearCache();
    Map<String, String> getAvailableVoices();
    void setVoiceParameters(String voiceType, double speed, double pitch, double volume);

}